﻿namespace Collaboris.Saf.Actions.Entities
{
    using System;
    using System.Collections.Generic;

    using SharePoint.Wss.Attributes;
    using SharePoint.Wss.Entities;

    [Serializable]
    [CollaborisClass(
         Title = "FTP Upload Info",
         ReleaseStatus = ReleaseStatus.Stable,
         DisableDocumentation = false,
         ContactAuthorEmail = "Support@Collaboris.co.uk",
         Summary = "This class defines the settings to upload one or more files to an FTP server.",
         UndoImplemented = false
   )]
    public class FtpUploadInfo : EntityBase
    {
        private string ftpAddress;

        private List<string> fileNames;

        private string password;

        private string userName;

        [CollaborisProperty(
         Summary = "The full FTP address of the server and folder.",
         Title = "FTP Address",
         Example = "ftp://ftp.server.co.uk/folder1"
         )]
        public string FtpAddress
        {
            get
            {
                return ftpAddress;
            }
            set
            {
                ftpAddress = value;
            }
        }

        [CollaborisProperty(
         Summary = "A list of filenames (with paths) to FTP to the FTP server.",
         Title = "File Names",
          Example = @"<list element-type=""string"">" +
                   @" <value>c:\windows\system32\drivers\etc\hosts</value>" +
                   @"</list>",
         SerializedExample = @"<ArrayOfString type=""System.Collections.Generic.List`1[[System.String]]"">" +
                         @" <string>c:\windows\system32\drivers\etc\hosts</string>" +
                         @"</ArrayOfString>",
        Remarks = "This can easily be paired with 'Action.GetFiles' to retrieve a list of files."
         )]
        public List<string> FileNames
        {
            get
            {
                return fileNames;
            }
            set
            {
                fileNames = value;
            }
        }

        [CollaborisProperty(
        Summary = "The password of the account to login in to the FTP Server.",
        Title = "Password",
        Example = "Password1"
        )]
        public string Password
        {
            get
            {
                return password;
            }
            set
            {
                password = value;
            }
        }


        [CollaborisProperty(
            Summary = "The user name to login in to the FTP Server with.",
            Title = "UserName",
            Example = "FTPUser"
            )]
        public string UserName
        {
            get
            {
                return userName;
            }
            set
            {
                userName = value;
            }
        }
    }
}